package com.qf.day05;

import java.util.Random;

public class Student {
    String name;
    String sex;
    int age;
    double height;
    double weight;
    String color = "yellow";
    int studyHours;
    int codeLineNum;
    int happy;
    int devAbility;
    public void run() {
        Random random = new Random();
        int time = 1 + random.nextInt(60);
        System.out.println(name + "在跑步,跑了" + time+"分钟");
        weight = weight - 1;
        happy = happy + 1;
        System.out.println("体重"+weight+"心情"+happy);
    }
    public void playGame(){

        Random random = new Random();
        int time = 1 + random.nextInt(60);
        if(time>30){
            devAbility=devAbility-10;
            happy=happy-10;
            System.out.println(name+"玩游戏,玩太久红温"+happy+"开发能力为"+devAbility);
        }else {
            happy=happy+10;
            System.out.println("小玩怡情"+happy);
        }

    }
}